<%@ Page Language="C#" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Slider Extender</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="TheScriptManager" runat="server"></asp:ScriptManager>
       
    <asp:TextBox ID="TextBox1" runat="server" />

    <ajaxToolkit:SliderExtender ID="SliderExtender1" runat="server"
                                TargetControlID="TextBox1"
                                BehaviorID="theSlider" />

    <span>You can use the slider to change the font size.</span>
                                
    <script type="text/javascript">
    <!--
        function pageLoad() {
           var slider = $find('theSlider');                      

           slider.add_valueChanged(onValueChanged);              
        }

        function onValueChanged(sender, e) {
           var slider = sender;
           document.body.style.fontSize = slider.get_Value() + 'px';    
        }
    //-->
    </script>
    </form>
</body>
</html>
